package com.example.qxfw.qxxx.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.qxfw.common.entity.qx.WaterRain;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Mapper;


import java.util.List;

@Mapper
@DS("qx")
public interface WaterRainMapper extends BaseMapper<WaterRain> {
    @Select("select  stcd, cast(sum(drp) as decimal(10,2)) As drp " +
            "from water_rain " +
            "where drp >= 0 and tm between '${tm1}' and '${tm2}' ${sql} and stcd in (${stcds}) " +
            "having sum(drp) {0} {1}")
    List<WaterRain> selectWaterRain(String tm1,String tm2,String sql,String stcds,String sql2,String sum);

}
